johnmather
2) “Pack Geometry Before Copying” packs the geometry inside of Houdini. “Use Instancer Node” sets how the packed geometry is brought into Maya.
Thanks John. My question was a actually a little different, I wanted to know if there was a preference of using the Copy To Points Sop vs. using the Instance object sop inside of the HDA for instancing. It looks like the Copy To Points sop is better because you can Pack before instancing?
johnmather
4) This is not currently possible, but has come up in the past. I'll file an RFE.
This would be huge. It is hard to track assets being instances after they are baked out.
johnmather
6) Thanks for the report. I'll file a bug for it.
Thank you. I am having the same situation for another asset I made. Any progress on this bug would be helpful.
johnmather
5) What is the intended use case for this? So that you can utilize Houdini to create the transforms and then connect a maya node to each?
There is no specific use case, it is just in case I want to hard wire a specific DAG object to instance, then I could ideally create an attribute to use to instance a specific DAG object.
Something holding me back from using the Engine in Maya is that even though you can instances DAG objects, once you makes them out they loose their name (4)), as well as some inconsistencies with the engine not baking the objects (6)). As a workaround I was trying to see if I could store the DAG object string along with the the transform data then just recreate the DAG objects being instanced seperately, similar to what Use Instrancer Node turned off does. I know this isnt ideal, but it would be a temporary fix to for 4) and 6), which are the main issues I am running into. I have a way to get the transform data for the instances, I would just need the DAG names.
Here is what I found to get the instance transforms:
from maya import OpenMaya as om
from maya import OpenMayaFX as omfx
sel = om.MSelectionList()
sel.add("instancer1")
dag = om.MDagPath()
sel.getDagPath(0, dag)
fn = omfx.MFnInstancer(dag)
count = fn.particleCount()
for i in xrange(count):
paths = om.MDagPathArray()
matrix = om.MMatrix()
fn.instancesForParticle(i, paths, matrix)
print i
print [paths[j].fullPathName() for j in xrange(paths.length())]
print [matrix(j/4, j%4) for j in xrange(16)]
Please let me know if there is a better way.